package com.syc.sqlsession;

import com.syc.entity.Configuration;

/**
 * @author Shen Yu Chen
 * @create 2020-04-24
 **/
public class DefaultSqlSessionFactory implements SqlSessionFactory {
    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        SqlSession sqlSession = new DefaultSqlSession(configuration);
        return sqlSession;
    }
}
